<template>
    <div>
      <div class="row">
        <div style="flex-shrink: 0;font-size: 14px;">序号：</div><el-input size="mini" style="width: 60px;margin-right: 20px;" v-model="nodeModel.sort"></el-input>
        <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div><el-switch v-model="nodeModel.isShow" :active-value="true" :inactive-value="false" active-color="#13ce66" inactive-color="#999999"></el-switch><div style="margin-left: 20px;">
            <el-button @click="selectTemplate" size="mini">选用模版</el-button>
          </div>
      </div>
      <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 10px;">标题：</div><el-input size="mini" style="width: 120px;margin-right: 20px;"  v-model="nodeModel.title"></el-input>
          <div style="flex-shrink: 0;font-size: 14px;">背景色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.background"></el-input>
          <el-color-picker v-model="nodeModel.configDict.componentStyle.background"></el-color-picker>
      </div>
      <div class="column">
          <jcSlider title="上边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginTop" :min="0" :max="200" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片宽："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.widthForFlex1" :min="10" :max="750" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片高：" :result="nodeModel.configDict.componentStyle.heightForFlex1"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.heightForFlex1" :min="10" :max="1600" show-input input-size="mini"></el-slider></jcSlider>
      </div>
      <div class="row">
        <div style="flex-shrink: 0;font-size: 14px;">选择背景图片：</div>
        <div style="width: 100%;"><el-input style="margin-left: 0px;" v-model="nodeModel.configDict.componentStyle.coverUrl"></el-input></div>
        <custom :model="nodeModel.configDict.componentStyle" buttonTitle="选择文件"></custom>
      </div>
      <!-- 分享区样式 -->
      <div style="border: 1px solid #eee;margin-top: 10px;padding: 10px 0;padding-right: 10px;">
        <!-- 个人信息区域样式 -->
        <div style="flex-shrink: 0;font-size: 14px;margin-left: 10px;font-size: 16px;font-weight: bold;">个人信息区域样式：</div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForFlex2" :label='true'>是</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForFlex2" :label='false'>否</el-radio>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 20px;">图文排列方向：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex2" label='column'>上下</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex2" label='column-reverse'>下上</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex2" label='row'>左右</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex2" label='row-reverse'>右左</el-radio>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 20px;">图文对齐方式：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex2" label='flex-start'>起点对齐</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex2" label='center'>居中对齐</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex2" label='flex-end'>终点对齐</el-radio>
        </div>
        <div class="column">
          <jcSlider title="上边距：" :result="nodeModel.configDict.componentStyle.marginTopForFlex2"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginTopForFlex2" :min="0" :max="200" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片宽：" :result="nodeModel.configDict.componentStyle.widthForCover2"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.widthForCover2" :min="10" :max="400" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="图片高：" :result="nodeModel.configDict.componentStyle.heightForCover2"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.heightForCover2" :min="10" :max="400" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="头像圆角：" :result="nodeModel.configDict.componentStyle.borderRadiusForCover2"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.borderRadiusForCover2" :min="10" :max="200" show-input input-size="mini"></el-slider></jcSlider>
        </div>
        <div class="column">
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">昵称样式：</div>
          </div>
          <jcSlider title="字体大小："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.fontsizeForText2" :min="20" :max="100" show-input input-size="mini"></el-slider></jcSlider>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.colorForText2"></el-input>
          <el-color-picker v-model="nodeModel.configDict.componentStyle.colorForText2"></el-color-picker>
        </div>
        <div style="background-color: #eee;width: 600px;height: 1px;margin-left: 20px;margin-top: 10px;"></div>
        <!-- 二维码区域 -->
        <div style="flex-shrink: 0;font-size: 14px;margin-left: 10px;font-size: 16px;font-weight: bold;">二维码区域样式：</div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 20px;">图文排列方向：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex1" label='column'>上下</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex1" label='column-reverse'>下上</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex1" label='row'>左右</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.flex_directionForFlex1" label='row-reverse'>右左</el-radio>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;margin-right: 20px;">图文对齐方式：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex1" label='flex-start'>起点对齐</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex1" label='center'>居中对齐</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.align_itemsForFlex1" label='flex-end'>终点对齐</el-radio>
        </div>
        <div class="column">
          <jcSlider title="上边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginTopForFlex1" :min="0" :max="1800" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="二维码宽高："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.widthForCover1" :min="10" :max="600" show-input input-size="mini"></el-slider></jcSlider>
        </div>
        <div class="column">
          <div style="flex-shrink: 0;font-size: 14px;">推荐ID样式：</div>
          <jcSlider title="上边距："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.marginTopForText1" :min="0" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          <jcSlider title="字体大小："><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.fontsizeForText1" :min="20" :max="100" show-input input-size="mini"></el-slider></jcSlider>
          <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
            <el-radio v-model="nodeModel.configDict.componentStyle.fontweightForText1" label='bold'>是</el-radio>
            <el-radio v-model="nodeModel.configDict.componentStyle.fontweightForText1" label=''>否</el-radio>
            <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
            <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.colorForText1"></el-input>
            <el-color-picker v-model="nodeModel.configDict.componentStyle.colorForText1"></el-color-picker>
          </div>
          <div class="row" style="margin-left: 90px;">
            <div style="flex-shrink: 0;font-size: 14px;">前置文字：</div>
            <div style="flex-shrink: 0;font-size: 14px;"></div><el-input size="mini" style="width: 100px;margin-right:10px;"  v-model="nodeModel.configDict.componentStyle.titleForText1"></el-input>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
    import custom from '@/components/jcupload/custom'
    import jcSlider from '@/views/interface/composing/components/jc-slider'
  export default {
    components: {
        custom,
        jcSlider
    },
    props:{
        nodeModel:{
            type: Object,
            default: res=>{}
        }
    },
    data() {
      return {

      }
    },
    methods:{
        selectRoute(item){
            this.$emit('selectRoute', item)
        },
        selectTemplate(){
            this.$emit('selectTemplate')
        },
    }
  }
</script>

<style lang="scss" scoped>
     @import './commonStyle.scss';
</style>